<!DOCTYPE html>
<html>
<head>
	<title>测试IOS与JS之前的互调</title>
	<style type="text/css">
	  * {
	  	font-size: 40px;
	  }
	</style>
  <script type="text/javascript">

  var jsFunc = function() {
    alert('Objective-C call js to show alert');
  }
  
  var jsParamFunc = function(argument) {
    document.getElementById('jsParamFuncSpan').innerHTML
    = argument['name'];
  }
  
  function showMsgFromIos(){
<!--      alert(12345);-->
      var str = OCModel.showstring();
      alert(str);
  }
  
  function getUserId2Html(){
      
      var str0 = tran.getUserId2Html();
      alert(str0);
      
  }
  
  </script>
  
  
</head>

<body>
  
<div style="margin-top: 100px">
	<h1>Test how to use objective-c call js</h1>
	<input type="button" value="Call ObjC system camera" onclick="OCModel.callSystemCamera()">
	<input type="button" value="Call ObjC system alert" onclick="OCModel.showAlertMsg('js title', 'js message')">
    <input type="button" value="OCModel.showstring()" onclick="showMsgFromIos()">
    
    <input type="button" value="tran.getUserId2Html()" onclick="getUserId2Html()">
        
        
</div>

<div>
	<input type="button" value="Call ObjC func with JSON " onclick="OCModel.callWithDict({'name': 'testname', 'age': 10, 'height': 170})">
	<input type="button" value="Call ObjC func with JSON and ObjC call js func to pass args." onclick="OCModel.jsCallObjcAndObjcCallJsWithDict({'name': 'testname', 'age': 10, 'height': 170})">
</div>
<div>
  <a href="test1.html">Click to next page</a>
</div>

<div>
	<span id="jsParamFuncSpan" style="color: red; font-size: 50px;"></span>
</div>


</body>
</html>